From e1033f5f5acbabd27b788910974b7b4f821bc33c Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 26 Dec 2001 17:06:13 +0000 Subject: [PATCH] (#67542, reported by Anders Carlsson) Wed Dec 26 11:49:01 2001 Owen Taylor (#67542, reported by Anders Carlsson) * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge rc_style->font_desc with defaul style instead of replacing it. * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial font descriptions in RC styles by calling pango_font_description_merge(). --- ChangeLog | 12 ++++++++++++ ChangeLog.pre-2-0 | 12 ++++++++++++ ChangeLog.pre-2-10 | 12 ++++++++++++ ChangeLog.pre-2-2 | 12 ++++++++++++ ChangeLog.pre-2-4 | 12 ++++++++++++ ChangeLog.pre-2-6 | 12 ++++++++++++ ChangeLog.pre-2-8 | 12 ++++++++++++ gtk/gtkrc.c | 9 +++++++-- gtk/gtkstyle.c | 5 +---- 9 files changed, 92 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b77bbf5dcb..a0fb1c8be5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +Wed Dec 26 11:49:01 2001 Owen Taylor + + (#67542, reported by Anders Carlsson) + + * gtk/gtkstyle.c (gtk_style_real_init_from_rc): Merge + rc_style->font_desc with defaul style instead of replacing + it. + + * gtk/gtkrc.c (gtk_rc_style_real_merge): Allow partial + font descriptions in RC styles by calling + pango_font_description_merge(). + 2001-12-24 James Henstridge * gtk/gtkdialog.h (doc comment): s/// to make the doc diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 355a134aa9..ab453891d9 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -1176,8 +1176,13 @@ gtk_rc_style_real_merge (GtkRcStyle *dest, if (dest->ythickness < 0 && src->ythickness >= 0) dest->ythickness = src->ythickness; - if (!dest->font_desc && src->font_desc) - dest->font_desc = pango_font_description_copy (src->font_desc); + if (src->font_desc) + { + if (!dest->font_desc) + dest->font_desc = pango_font_description_copy (src->font_desc); + else + pango_font_description_merge (dest->font_desc, src->font_desc, FALSE); + } if (src->rc_properties) { diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 096e98ad8b..ed8a4ba5b1 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1239,10 +1239,7 @@ gtk_style_real_init_from_rc (GtkStyle *style, clear_property_cache (style); if (rc_style->font_desc) - { - pango_font_description_free (style->font_desc); - style->font_desc = pango_font_description_copy (rc_style->font_desc); - } + pango_font_description_merge (style->font_desc, rc_style->font_desc, TRUE); for (i = 0; i < 5; i++) { -- 2.30.2